<template>
  <div>
    <h4>{{ $store.state.car.info }}</h4>
    <p>{{ info }}</p>
    <button @click="updateInfo">调用</button>
    <button @click="asyncInfo">调用</button>
    <h5>{{ infoMsg }}</h5>
  </div>
</template>

<script>
import { mapActions, mapGetters, mapMutations, mapState } from "vuex";
export default {
  computed: {
    ...mapState("car", ["info"]),
    ...mapGetters("car", ["infoMsg"]),
  },
  methods: {
    ...mapMutations("car", ["updateInfo"]),
    ...mapActions("car", ["asyncInfo"]),
  },
};
</script>

<style lang="scss" scoped></style>
